


import { HttpClient } from '../http/http.js';
import { Utils } from '../utils/utils.js';


const httpVersion = new HttpClient({});

/** 服务器版本号 */
let serverVersion = '';
/** 本地版本号 */
let localVersion = '';
/** 版本号是否相同 */
let isDiff = false;

/**
 * 打印版本号
 */
export const printVersion = async () => {
    const res = await httpVersion.request({ url: './static/data/version.json', params: { v: Utils.getRandomChars(4) } });
    serverVersion = res.version;
    console.log(`服务器版本号:${serverVersion}`);
}


export class Version {
	static print = printVersion;
}